package theOrbalEra.client.OrbalArts.entity;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;

public abstract class OrbalArtEntityToOneShoot extends OrbalArtEntityToOne {
    public double accelerationX;
    public double accelerationY;
    public double accelerationZ;
    protected double scaleOfAcceleration;
    public OrbalArtEntityToOneShoot(World world,EntityPlayer player){
    	super(world,player,null);
    }
    public OrbalArtEntityToOneShoot(World world,EntityPlayer player,EntityLiving entity){
    	super(world,player,entity);
    }
	public OrbalArtEntityToOneShoot(World world,EntityPlayer player, EntityLiving entity, double par3, double par5, double par7) {
		super(world,player,entity);
		this.scaleOfAcceleration=0.1D;
		this.target= entity;
		this.motionX = this.motionY = this.motionZ = 0.0D;
		Vec3 ver3 = player.getLookVec();
		this.setPosition(player.posX+ver3.xCoord*5, player.posY+ver3.yCoord*5, player.posZ+ver3.zCoord*5);
        par3 += this.rand.nextGaussian() * 0.4D;
        par5 += this.rand.nextGaussian() * 0.4D;
        par7 += this.rand.nextGaussian() * 0.4D;
        double dis = (double)MathHelper.sqrt_double(par3 * par3 + par5 * par5 + par7 * par7);
        this.accelerationX = par3 / dis *scaleOfAcceleration;
        this.accelerationY = par5 / dis * scaleOfAcceleration;
        this.accelerationZ = par7 / dis * scaleOfAcceleration;
	}

	


	protected abstract  void onImpact(MovingObjectPosition movingobjectposition);





}
